From da6eab421072e0cec2afb49a02009b408a8938d4 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 20 Oct 2010 08:41:58 +0100 Subject: [PATCH] svm: Re-enable 2MB super paging Bitwise OR operator has higher precedence than conditional operator. This patch fixes the incorrect associativity and re-enables 2MB paging for AMD family 10h system. Signed-off-by: Wei Wang Acked-by: Wei Huang --- xen/arch/x86/hvm/svm/svm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 12b1e5d6c5..a43bc728dc 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -904,8 +904,8 @@ struct hvm_function_table * __init start_svm(void) svm_function_table.hap_supported = cpu_has_svm_npt; svm_function_table.hap_capabilities = HVM_HAP_SUPERPAGE_2MB | - ((CONFIG_PAGING_LEVELS == 4) && (cpuid_edx(0x80000001) & 0x04000000)) ? - HVM_HAP_SUPERPAGE_1GB : 0; + (((CONFIG_PAGING_LEVELS == 4) && (cpuid_edx(0x80000001) & 0x04000000)) ? + HVM_HAP_SUPERPAGE_1GB : 0); return &svm_function_table; } -- 2.30.2